﻿using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TestByWire.Test
{
    [TestClass]
	public class WithTests
	{
        [TestMethod]
        public void WithDependency_MustNotTerminateScenario()
        {
            new TargetInvokerUnderTest(typeof(MyType));

            Scenario.Is(() =>
            {
                var dependency = With<IDbAccess>.Dependency;

                A.CallTo<IDbAccess, string>(d => d.ProviderName).Returns("Foo");

                Assert.IsTrue(Scenario.IsRecording());
            });
        }
	}
}
